package com.springboot.autoconfigure.oss.config;

import com.springboot.autoconfigure.oss.annontion.RequiredFiled;
import com.springboot.autoconfigure.oss.service.impl.AliyunOssApiServiceImpl;
import com.springboot.autoconfigure.oss.service.impl.Pan123OssApiServiceImpl;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;

@Data
@Accessors(chain = true)
@Configuration
@ConfigurationProperties(prefix = "oss.pan123")
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public class Pan123OSSPropertis extends AbstractOSSPropertis {


    private String domain="https://open-api.123pan.com";
    @RequiredFiled
    private String clientId;
    @RequiredFiled
    private String clientSecret;

    private String dirName;

    @Override
    public Class getImpl() {
        return Pan123OssApiServiceImpl.class;
    }
}
